<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>🎵 登录我的音乐库</title>
  <link rel="stylesheet" href="/static/style.css">
  <style>
    body {
      font-family: 'Helvetica Neue', sans-serif;
      background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    .login-box {
      background: white;
      border-radius: 16px;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
      padding: 40px;
      width: 300px;
      text-align: center;
    }

    h2 {
      margin-bottom: 20px;
      color: #333;
    }

    input[type="text"],
    input[type="password"] {
      width: 100%;
      padding: 10px;
      margin-bottom: 15px;
      border: 1px solid #ccc;
      border-radius: 8px;
      font-size: 14px;
      outline: none;
      transition: border 0.2s;
    }

    input[type="text"]:focus,
    input[type="password"]:focus {
      border-color: #007bff;
    }

    button {
      width: 100%;
      padding: 10px;
      background-color: #007bff;
      border: none;
      border-radius: 8px;
      color: white;
      font-size: 15px;
      cursor: pointer;
      transition: background-color 0.3s;
    }

    button:hover {
      background-color: #0056b3;
    }

    .error {
      color: red;
      font-size: 13px;
      margin-bottom: 10px;
    }

    .footer {
      margin-top: 15px;
      font-size: 12px;
      color: #888;
    }
  </style>
</head>
<body>
  <div class="login-box">
    <h2>🎶 登录音乐库</h2>

    {% if error %}
    <div class="error">{{ error }}</div>
    {% endif %}

    <form method="post" action="/login">
      <input type="text" name="username" placeholder="用户名" required>
      <input type="password" name="password" placeholder="密码" required>
      <button type="submit">登录</button>
    </form>

    <div class="footer">仅限个人使用 · 本地音乐播放</div>
  </div>
</body>
</html>